<?php

use yii\helpers\Url;
use yii\helpers\Html;
use common\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model backend\models\StudentStatus */

$this->title = $model->XJBH;
$this->params['breadcrumbs'][] = ['label' => 'Student Statuses', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
\yii\web\YiiAsset::register($this);
?>
<div class="student-status-view">

    <div class="panel">
		<div class="panel-heading">
            <?= Html::encode($this->title) ?>
		</div>
        <div class="panel-body">
            <?= DetailView::widget([
                'model' => $model,
                'fieldRows' => [
                    [
                        '姓名' => $model->gR->name,
                        '性别' => $model->gR->sex,
                    ],[
                        '学籍编号' => $model->XJBH,
                        '身份证号' => $model->gR->id_number,
                    ],[
                        '学校' => $model->XXMC,
                        '年级' => $model->xS->bJ->NJ,
                    ],[
                        '专业' => $model->ZYMC,
                        '班级' => $model->BJBH,
                    ],[
                        '学期' => $model->XQ,
                        '学号' => $model->xS->XH,
                    ],[
                        '学籍状态' => $model->XJZT,
                        '审核状态' => $model->SHZT,
                    ],[
                        '学籍登记人' => $model->XJDJR,
                        '审核人' => $model->SHR,
                    ],[
                        '登记时间' => $model->DJSJ,
                        '审核时间' => $model->SHSJ,
                    ],
                ],
            ]) ?>
        </div>
    </div>

    <?php if($model->fJDM) { ?>
    <div class="panel">
		<div class="panel-heading">
            附件
		</div>
        <div class="panel-body">        
            <table class="table table-hover table-bordered">
                <tr>
                    <th>序号</th>
                    <th>文件名</th>
                    <th>创建时间</th>
                    <th>更新时间</th>
                    <th>查看</th>
                </tr>
                <?php foreach($model->fJDM as $fj){ $idx++; ?>
                <tr>
                    <td><?= $idx ?></td>
                    <td><?= Html::encode($fj->WJM) ?></td>
                    <td><?= Html::encode($fj->CJSJ) ?></td>
                    <td><?= Html::encode($fj->GXSJ) ?></td>
                    <td><a href="<?= Url::to('@web/'.$fj->WJLJ) ?>" class="btn btn-xs btn-primary" target="_blank">查看</a></td>
                </tr>
                <?php } ?>
            </table>
        </div>
    </div>
    <?php } ?>
    
</div>
